﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Hospitals/Master/HospitalsMaster.Master"
    AutoEventWireup="true" CodeBehind="StorageGoodsList.aspx.cs" Inherits="HZ.DrugTrade.Web.Hospitals.StorageManage.StorageGoodsList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">验收入库</a></li>
            <li><a href="StoragedGoods.aspx">入库详情</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    <table class="querylist">
                        <tr>
                            <td align="right">产品名称：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtGoodsName" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">规格型号：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtOutLook" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">材质：
                            </td>
                            <td align="left" width="145px">
                                <asp:TextBox ID="txtMaterial" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">拼音码：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtpinyincode" runat="server"></asp:TextBox>
                            </td>

                            <td align="right">
                                <asp:Label Text="项目：" ID="lblProjectid" runat="server" />
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="ddlProjectid" runat="server">
                                    <asp:ListItem Value="0002">2014年内蒙古自治区网上高值医用耗材阳光采购项目</asp:ListItem>
                                    <asp:ListItem Value="0001">2012年内蒙古自治区网上医用耗材采购项目</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <asp:Literal runat="server" ID="ltlAdvance" Text="&lt;tbody id='advance' style='display:none'&gt;"></asp:Literal>
                        <tr>
                            <%--                            <td align="right">
                                拼音码：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtPinyinCode" runat="server"></asp:TextBox>
                            </td>--%>
                            <td align="right">配送企业：
                            </td>
                            <td align="left" width="145px">
                                <asp:TextBox ID="txtCompanyName_PS" runat="server"></asp:TextBox>
                            </td>
                            <td align="right">配送时间：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtAddTimeFromPS" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                    Width="62px"></asp:TextBox>-<asp:TextBox ID="txtAddTimeToPS" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                                        Width="62px"></asp:TextBox>
                            </td>
                            <td align="right">生产企业：
                            </td>
                            <td align="left">
                                <asp:TextBox ID="txtCompanyName_SC" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </td>
                <td width="100px">
                    <hz:HzButton ID="btnQuery" runat="server" Text="查询" OnClick="btnQuery_Click" CssClass="searchbtn" />
                    <hz:HzLinkButton ID="lbnSwitch" runat="server" CommandArgument="simple" OnClick="lbnSwitch_Click"
                        Text="高级查询"></hz:HzLinkButton>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwProduceCatalog" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="ProcureCatalogID,CompanyID_PS,CompanyName_PS" EmptyDataText="该医疗机构暂无可入库的产品！"
        OnRowDataBound="gvwProduceCatalog_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize*(AspNetPager1.CurrentPageIndex-1)%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="产品编号" Visible="false">
                <ItemTemplate>
                    <%#Eval("Goodsid") %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="入库量">
                <ItemTemplate>
                    <asp:TextBox ID="txtCount" runat="server" Width="50px" oncontextmenu="javascript:return false;"
                        onblur="javascript:return check_isnum();" onkeydown="javascript:return check_isnum();"
                        Text='<%# Eval("Dis_DistributeCount") %>' MaxLength="5" ToolTip="整数类型(格式如10)"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="已入库">
                <ItemTemplate>
                    <asp:Label runat="Server" ID='lblCount' Text='<%# Eval("Dis_WarehouseCount") %>'> </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="批配送量">
                <ItemTemplate>
                    <asp:Label ID="lblDistributeCount" runat="server" Text='<%#Eval("Dis_DistributeCount") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <%--<asp:BoundField DataField="Dis_DistributeCount" HeaderText="批配送量" />--%>
            <%-- <asp:TemplateField HeaderText="采购价">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Price") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>--%>
            <%--<asp:BoundField DataField="Price" HeaderText="采购价" DataFormatString="{0:N4}" />--%>
            <asp:TemplateField HeaderText="采购价">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%#HZ.DrugTrade.Web.Function.FormPrice(Eval("ProjectID"), Eval("Price")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="GoodsName" HeaderText="产品名称" />
            <asp:BoundField DataField="Outlookc" HeaderText="规格型号" />
            <asp:BoundField DataField="Material" HeaderText="材质" NullDisplayText="无" />
            <%--<asp:BoundField DataField="Factor" HeaderText="转换系数" />--%>
            <asp:BoundField DataField="Unit" HeaderText="最小计量单位" />
            <asp:BoundField DataField="QualityLevel" HeaderText="产品类别" />
            <asp:BoundField DataField="ProcurePrice" HeaderText="采购限价" DataFormatString="{0:N4}"
                Visible="false" />
            <asp:BoundField DataField="CompanyName_SC" HeaderText="生产企业" />
            <asp:BoundField DataField="CompanyName_PS" HeaderText="配送企业" />
            <asp:BoundField DataField="OrderName" HeaderText="采购单" />
            <asp:BoundField DataField="BatchRecordID" HeaderText="批号" />
            <%--  <asp:TemplateField HeaderText="批号">
                <ItemTemplate>
                    <asp:TextBox runat="server" ID="txtBatchRecordID" Text='<%#Eval("BatchRecordID")%>'></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="采购明细编号" Visible="false">
                <ItemTemplate>
                    <asp:Label ID="OrderDetailID" runat="server" Text='<%# Eval("OrderDetailID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="配送流水号" Visible="false">
                <ItemTemplate>
                    <asp:Label ID="DistributionSerialID" runat="server" Text='<%# Eval("DistributionSerialID") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="DistributeTime" HeaderText="配送时间" DataFormatString="{0:d}" />
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="addTable_chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this, 'ctl00_ContentPlaceHolder1_gvwProduceCatalog', 'addTable_chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="checkbox1" id="checkbox1" value='<%#Eval("DistributionSerialID")%>'
                        onclick="chkChecked(this, 'ctl00_ContentPlaceHolder1_gvwProduceCatalog', 'addTable_chkAll');"
                        runat="server" />
                </ItemTemplate>
                <HeaderStyle Width="25px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>提示：<span> 填写选择需要入库的产品，点击“确认入库”,完成入库操作。</span></li>
        </ul>
    </div>
    <div class="listctrl">
        &nbsp;
        <hz:HzButton ID="btnFinish" runat="server" Text="确认入库" OnClick="btnFinish_Click"
            OnClientClick="if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwProduceCatalog', '请至少选择一项！')) {return confirm('确实要验收入库所选产品吗？');}return false;"
            CssClass="btn" OperateType="入库" />
        <hz:HzButton ID="btnAll" runat="server" Text="全部确认" CssClass="btn" OnClientClick="return confirm('全部入库操作，入库量默认为配送量，是否确定全部入库？')" OnClick="btnAll_Click" />
        <hz:HzButton ID="btnExport" runat="server" Text="导出Excel" CssClass="btn" ToolTip="导出Excel"
            OnClick="btnExport_Click" />
    </div>
</asp:Content>
